#pragma once
#include "IEngineSystem.h"
#include "DirectionalLightComponent.h"
#include "AmbientLightComponent.h"
#include "SpotLightComponent.h"
#include "PointLightComponent.h"
#include "ICameraComponent.h"

// {A95585B2-F92F-4d09-89E2-8B61A47C0CC4}
DEFINE_GUID(SCENE_SYSTEM_GUID, 
0xa95585b2, 0xf92f, 0x4d09, 0x89, 0xe2, 0x8b, 0x61, 0xa4, 0x7c, 0xc, 0xc4);

class SceneSystem : public IEngineSystem
{
public:
	SceneSystem(EnginePointer<SettingsManager>& settings, EnginePointer<IMessageQueue>& messages);
	~SceneSystem();
	HRESULT RegisterComponent(EnginePointer<IEngineComponent>& component);
	GUID getSystemIdentifier();

	list<EnginePointer<DirectionalLightComponent>>::iterator DirectionalComponentsBegin();
	list<EnginePointer<DirectionalLightComponent>>::iterator DirectionalComponentsEnd();
	list<EnginePointer<AmbientLightComponent>>::iterator AmbientComponentsBegin();
	list<EnginePointer<AmbientLightComponent>>::iterator AmbientComponentsEnd();
	list<EnginePointer<SpotLightComponent>>::iterator SpotComponentsBegin();
	list<EnginePointer<SpotLightComponent>>::iterator SpotComponentsEnd();
	list<EnginePointer<PointLightComponent>>::iterator PointComponentsBegin();
	list<EnginePointer<PointLightComponent>>::iterator PointComponentsEnd();
	list<EnginePointer<ICameraComponent>>::iterator CamerasBegin();
	list<EnginePointer<ICameraComponent>>::iterator CamerasEnd();

	AUTO_SIZE;
private:
	list<EnginePointer<DirectionalLightComponent>> directionalComponents;
	list<EnginePointer<AmbientLightComponent>> ambientComponents;
	list<EnginePointer<SpotLightComponent>> spotComponents;
	list<EnginePointer<PointLightComponent>> pointComponents;
	list<EnginePointer<ICameraComponent>> cameras;
};
